
<tagLib name="html" />
<include file="../Public/header" />
<div id="wrap"> <include file="../Public/top" />
  <div id="content">
    <div class="mainarea">
      <div class="maininner">
        <div class="bdrcontent">
          <form id="phpform" method="post" action="__URL__/insert" class="formtable" onsubmit="return $.formValidator.pageIsValid('1')">
            <input name="nid" type="hidden" style="width:260px;" id="nid" value="{.nid}"  />
            <input name="moduleID" type="hidden" style="width:260px;" id="moduleID" value="{$moduleID}"  />
            <table width="100%" cellpadding="0" cellspacing="0" class="formtable">
              <tr>
                <td width="200"><label for="select">上级分类：</label></td>
                <td><select name="fid" id="fid">
                    <option value="">请选择分类</option>
                    <option value="0">无上级分类</option>
                    <volist name="fid" id="fid">
                      <option value="{$fid.id}">{$fid.name}</option>
                    </volist>
                  </select>                </td>
              </tr>
              <tr>
                <td>name：</td>
                <td><input name="name" type="text" style="width:140px;" id="name"  /></td>
              </tr>
              <tr>
                <td>info：</td>
                <td><textarea name="info" id="info" style="width:360px;"></textarea></td>
              </tr>
             
              <tr>
                <td>&nbsp;</td>
                <td><input type="submit" value="提交" class="submit" />
                  <input name="reset" type="reset" value="重置" class="submit" />
                  <input name="button" type="button" value="返回" onclick="javascript:history.go(-1);"  class="submit" /></td>
              </tr>
            </table>
          </form>
        </div>
        <br />
      </div>
    </div>
    <include file="../Public/menu" /> </div>
  <include file="../Public/footer" /> </div>
</body></html><script type="text/javascript">
    $(document).ready(function()
    {
		$.formValidator.initConfig({autotip:true,onerror:function(msg){alert(msg)}});
		$("#name").formValidator({onshow:"分类名称是必须的",onfocus:"分类名称最少2个字",oncorrect:"恭喜你,通过了"}).inputValidator({min:4,max:16,onerror:"你输入的分类名称长度不正确,请确认"});
		$("#info").formValidator({onshow:"请输入信息！",onfocus:"信息长度最少为2-8个字",oncorrect:"恭喜你,通过了"}).inputValidator({min:4,max:100,onerror:"你输入的信息长度不正确,请确认"});
		$("#fid").formValidator({onshow:"请选择分类",onfocus:"至少选择一项吧",oncorrect:"恭喜你,通过了"}).inputValidator({min:1,onerror:"你还没有选择分类,请选择"});
		//$("#outLink").formValidator({onshow:"请填写外部链接",onfocus:"信息长度最少为5个字符以上",oncorrect:"恭喜你,通过了"}).inputValidator({min:1,onerror:"你还没有填写外部链接"});
    });
</script>
